﻿using System;
using Microsoft.SharePoint.WebControls;

namespace Trentacular.SharePoint.Features.Web.UI
{
    public class BaseSPLayoutsPage : LayoutsPageBase
    {
        public BaseSPLayoutsPage()
        {
            this.UseWebMasterUrl = true;
        }

        protected virtual bool UseWebMasterUrl { get; set; }

        protected override void OnPreInit(EventArgs e)
        {
            base.OnPreInit(e);
            if (UseWebMasterUrl)
                this.MasterPageFile = Web.MasterUrl;
        }
    }
}
